<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function go(callback) {
            var a = 10;
            callback(a);
        }
        /* 可以将函数内部的值,获取  相当return */
        go(res => {
            console.log(res)
        })
        /* function fun(res) {
            console.log(res);// 10
        } 
        go(fun);*/
        /* fun = (res) => {
            console.log(res)
        } 
        go(fun);*/




    </script>
</body>

</html>